From 8fb16359d547cd56543e2a07c233e61ebb01b550 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Mon, 26 Oct 2009 12:20:07 +0000 Subject: [PATCH] xend, passthrough: Small fix to find_all_the_multi_functions() From: Stefano Stabellini Signed-off-by: Keir Fraser --- tools/python/xen/util/pci.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/python/xen/util/pci.py b/tools/python/xen/util/pci.py index 8334e3d437..e89bf3446f 100644 --- a/tools/python/xen/util/pci.py +++ b/tools/python/xen/util/pci.py @@ -830,7 +830,10 @@ class PciDevice: def find_all_the_multi_functions(self): sysfs_mnt = find_sysfs_mnt() - parent = pci_dict_to_bdf_str(self.find_parent()) + parentdict = self.find_parent() + if parentdict is None : + return [ self.name ] + parent = pci_dict_to_bdf_str(parentdict) pci_names = os.popen('ls ' + sysfs_mnt + SYSFS_PCI_DEVS_PATH + '/' + \ parent + '/').read() funcs = extract_the_exact_pci_names(pci_names) -- 2.30.2